﻿<%@ Page Language="C#" MasterPageFile="~/TeamManager.Master" AutoEventWireup="true" CodeBehind="Persons.aspx.cs" Inherits="NWS.Games.Persons" Title="Люди" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
	<asp:ScriptManager ID="ScriptManager1" runat="server">
	</asp:ScriptManager>
	<telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server" height="100%" 
		width="100%">
		<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" 
			DataSourceID="PersonDS" GridLines="None" Skin="Office2007" 
			AllowAutomaticDeletes="True" AllowAutomaticUpdates="True" 
			onitemdeleted="RadGrid1_ItemDeleted" oniteminserted="RadGrid1_ItemInserted" 
			onitemupdated="RadGrid_ItemUpdated" AllowAutomaticInserts="True">
			<HeaderContextMenu>
				<CollapseAnimation Duration="200" Type="OutQuint" />
			</HeaderContextMenu>
			<MasterTableView DataSourceID="PersonDS" DataKeyNames="ID" 
				CommandItemDisplay="TopAndBottom">
				<Columns>
					<telerik:GridEditCommandColumn ButtonType="ImageButton">
					</telerik:GridEditCommandColumn>
					<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" 
						SortExpression="ID" UniqueName="ID" ReadOnly="True">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Name" HeaderText="Name" 
						SortExpression="Name" UniqueName="Name">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Description" HeaderText="Description" 
						SortExpression="Description" UniqueName="Description">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="MaxSendingPause" DataType="System.Int32" 
						HeaderText="MaxSendingPause" SortExpression="MaxSendingPause" 
						UniqueName="MaxSendingPause" Visible="False">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="FullName" HeaderText="Full Name" 
						SortExpression="FullName" UniqueName="FullName">
					</telerik:GridBoundColumn>
					<telerik:GridDateTimeColumn DataField="BirthDate" DataType="System.DateTime" 
						HeaderText="Birth Date" SortExpression="BirthDate" UniqueName="BirthDate" 
						DataFormatString="{0:d}">
					</telerik:GridDateTimeColumn>
					<telerik:GridBoundColumn DataField="TeamPhone" HeaderText="Team Phone" 
						SortExpression="TeamPhone" UniqueName="TeamPhone">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="OtherPhones" HeaderText="Other Phones" 
						SortExpression="OtherPhones" UniqueName="OtherPhones">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="ICQ" HeaderText="ICQ" SortExpression="ICQ" 
						UniqueName="ICQ">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Skype" HeaderText="Skype" 
						SortExpression="Skype" UniqueName="Skype">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="OtherIMs" HeaderText="Other IMs" 
						SortExpression="OtherIMs" UniqueName="OtherIMs">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Radio" HeaderText="Radio" 
						SortExpression="Radio" UniqueName="Radio">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="Tracker" HeaderText="Tracker" 
						SortExpression="Tracker" UniqueName="Tracker">
					</telerik:GridBoundColumn>
					<telerik:GridBoundColumn DataField="OtherDevices" HeaderText="OtherDevices" 
						SortExpression="OtherDevices" UniqueName="OtherDevices">
					</telerik:GridBoundColumn>
					<telerik:GridButtonColumn ConfirmText="Delete this entity?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                        UniqueName="DeleteColumn">
          </telerik:GridButtonColumn>
					
				</Columns>
				<EditFormSettings>
					<EditColumn UniqueName="EditCommandColumn1">
					</EditColumn>
				</EditFormSettings>
			</MasterTableView>
			<FilterMenu>
				<CollapseAnimation Duration="200" Type="OutQuint" />
			</FilterMenu>
		</telerik:RadGrid>
		<asp:ObjectDataSource ID="PersonDS" runat="server" 
			DataObjectTypeName="Dzzzr.PersonInfo" DeleteMethod="DeletePerson" 
			InsertMethod="InsertPerson" SelectMethod="GetPersonList" 
			TypeName="Dzzzr.PersonController" UpdateMethod="UpdatePerson" 
			OldValuesParameterFormatString="original_{0}">
			<SelectParameters>
				<asp:Parameter DefaultValue="1" Name="teamID" Type="Int32" />
			</SelectParameters>
			<UpdateParameters>
            <asp:Parameter Name="BirthDate" Type="DateTime" />
    </UpdateParameters>

		</asp:ObjectDataSource>
	</telerik:RadAjaxPanel>
</asp:Content>
